From: Olaf Hering Date: Fri, 24 Oct 2014 14:17:09 +0000 (+0200) Subject: tools/hotplug: every systemd service depends on proc-xen.mount X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4130 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=f96b89e560d1b0b626c3738b66859aabdf77a533;p=xen.git tools/hotplug: every systemd service depends on proc-xen.mount Every systemd service file uses /proc/xen/capabilites to check if it runs in a dom0. Update every service file to enable proc-xen.mount with the Requires= statement and schedule its startup with the After= statement. In some places var-lib-xenstored.mount is removed. This is ok because its optional and this unit is enabled by xenstored itself. After all its a private directory for xenstored. Signed-off-by: Olaf Hering Cc: Ian Campbell Cc: Ian Jackson Cc: Stefano Stabellini Cc: Wei Liu Acked-by: Wei Liu --- diff --git a/tools/hotplug/Linux/systemd/xen-init-dom0.service.in b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in index 3ed1633627..4d4cb2327a 100644 --- a/tools/hotplug/Linux/systemd/xen-init-dom0.service.in +++ b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in @@ -1,7 +1,7 @@ [Unit] Description=xen-init-dom0, initialise Dom0 configuration (xenstore nodes, JSON configuration stub) -Requires=xenstored.socket -After=xenstored.socket +Requires=xenstored.socket proc-xen.mount +After=xenstored.socket proc-xen.mount ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in index 0b9c2e5f4a..1e21abb829 100644 --- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in @@ -1,7 +1,7 @@ [Unit] Description=qemu for xen dom0 disk backend -Requires=proc-xen.mount var-lib-xenstored.mount xenstored.socket -After=xenstored.socket xenconsoled.service +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount xenstored.socket xenconsoled.service Before=xendomains.service libvirtd.service libvirt-guests.service RefuseManualStop=true ConditionPathExists=/proc/xen/capabilities diff --git a/tools/hotplug/Linux/systemd/xenconsoled.service.in b/tools/hotplug/Linux/systemd/xenconsoled.service.in index d3b85a5b6f..e6cb853f0c 100644 --- a/tools/hotplug/Linux/systemd/xenconsoled.service.in +++ b/tools/hotplug/Linux/systemd/xenconsoled.service.in @@ -1,7 +1,7 @@ [Unit] Description=Xenconsoled - handles logging from guest consoles and hypervisor -Requires=xenstored.socket -After=xenstored.socket +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount xenstored.socket ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in index 214da7a2db..757278f686 100644 --- a/tools/hotplug/Linux/systemd/xendomains.service.in +++ b/tools/hotplug/Linux/systemd/xendomains.service.in @@ -1,7 +1,7 @@ [Unit] Description=Xendomains - start and stop guests on boot and shutdown -Requires=xenstored.socket -After=xenstored.socket xenconsoled.service xen-init-dom0.service +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount xenstored.socket xenconsoled.service xen-init-dom0.service ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xenstored.socket.in b/tools/hotplug/Linux/systemd/xenstored.socket.in index 9b28e7481a..2e8ee04ecf 100644 --- a/tools/hotplug/Linux/systemd/xenstored.socket.in +++ b/tools/hotplug/Linux/systemd/xenstored.socket.in @@ -1,5 +1,7 @@ [Unit] Description=xenstore socket +Requires=proc-xen.mount var-lib-xenstored.mount +After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket] diff --git a/tools/hotplug/Linux/systemd/xenstored_ro.socket.in b/tools/hotplug/Linux/systemd/xenstored_ro.socket.in index 80402b39ef..140ad94d3b 100644 --- a/tools/hotplug/Linux/systemd/xenstored_ro.socket.in +++ b/tools/hotplug/Linux/systemd/xenstored_ro.socket.in @@ -1,5 +1,7 @@ [Unit] Description=xenstore ro socket +Requires=proc-xen.mount var-lib-xenstored.mount +After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket]